package com.atguigu.dao.impl;

import com.atguigu.bean.OrderItem;
import com.atguigu.dao.BaseDao;
import com.atguigu.dao.OrderItemDao;

public class OrderItemDaoImpl extends BaseDao<OrderItem> implements OrderItemDao {
    @Override
    public void addOrderItem(OrderItem orderItem) {
        String sql="insert into t_order_item values(null,?,?,?,?,?,?)";
        update(
                sql,
                orderItem.getBook_name(),
                orderItem.getPrice(),
                orderItem.getImg_path(),
                orderItem.getItem_count(),
                orderItem.getItem_amount(),
                orderItem.getOrder_id()
        );

    }
}
